var weibo = require('weibo');

// change appkey to yours
var appkey = '3152642969';
var secret = 'c9ca9043443fa54bfba2404b1523ac14';
var oauth_callback_url = 'http://www.jingxuan.me/index.php/user/sinalogined';
weibo.init('weibo', appkey, secret, oauth_callback_url);
/**
weibo.get_authorization_url({'blogtype':'weibo'},function(err,url){
	console.log(url);
}); 
**/
weibo.get_access_token({blogtype:"weibo",code:'a99099fc5908a4c0bbab2456c7e08ac7'},function(err,token){
		console.log(token);
});
/**
var user = { blogtype: 'weibo',access_token:'2.00JaPGpBJ9K38D96773d17c6FzgP9E' };
var cursor = {count: 1};
weibo.public_timeline(user, cursor, function (err, statuses) {
  if (err) {
    console.error(err);
  } else {
    //console.log(statuses);
  }
});
**/